package com.appspot.battlerafts.jsons;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;

/**
 * Created by IntelliJ IDEA.
 * User: Tonis
 * Date: 28.03.12
 * Time: 19:03
 * To change this template use File | Settings | File Templates.
 */
public class GameStartJSON {
    public String gameID;
    public Integer nrOfPlayers;
    public Long initatorID;
    public ArrayList<Long> itendedPlayers;
    public Date startTime;
    
    @Override
    public String toString(){
        StringBuilder s = new StringBuilder("[");
        for (Long l : itendedPlayers){
            s.append(l + " ");
        }
        s.append("]");
        return "ID: " + gameID + " nrOfPlayers: " + nrOfPlayers + " initatorID: " + initatorID + " itendedPlayers: " + s.toString() + " startTime: " + new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(startTime);
    }
}
